<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>

</head>
<body>

<div id="app">

</div>
<script>
    //localStorage 以文本形式保存在硬盘,key-value的形式将数据存放的
    // localStorage.name = "百知教育"
    // console.log(localStorage.name)
    // localStorage.removeItem("name")
    // console.log(localStorage.name);
    localStorage.age = 12
    localStorage['bir'] = '2012-12-12'
    localStorage.setItem("pwd","123")
    // console.log(localStorage.age)
    // console.log(localStorage.bir)
    // console.log(localStorage.pwd)
    // let pwd = localStorage.setItem("pwd")
    // console.log(pwd)

    for (let i=0;i<localStorage.length;i++){
        console.log(localStorage.key(i)+" "+localStorage.getItem(localStorage.key(i)))
    }
    localStorage.clear()

    new Vue({
        el: "#app",
        data: {},
    })
</script>
</body>
</html>